import './loading.css'
const Loading = {
    target:null,
    init(){
        // console.log('Loading.init...')
        // const div = document.createElement('div')
        // div.className = 'loading'
        // div.innerHTML = '努力加载中.....'
        // document.body.appendChild(div)
        this.target = document.createElement('div')
        this.target.className = 'loading'
        // this.target.innerText = '努力加载中...'
        document.body.appendChild(this.target)
    },
    show(){
        // this.init()
        if(!this.target){
            this.init()
        }else{
            this.target.style.display = 'block'
        }
      
    },
    hide(){
        this.target.style.display = 'none'
    }
}

export default Loading